<template>
	<view class="addrInfo" @click="click">
		<view class="content" v-if="model.id">
			<u-icon class='left' name="map" color='#FC5E53'></u-icon>
			<view class="center">
				<view class="top">
					<view>{{model.contactName}}</view>
					<view style="margin-left: 10rpx;">{{model.contactPhone}}</view>
				</view>
				<view class="footer">
					{{model.addrInfo}}
				</view>
			</view>
			<u-icon class='left' name="arrow-right" v-if='isShowArrowRight'></u-icon>
		</view>
		<view class="noDate" style="color: #d4a781;display: flex;flex-direction: row;align-items: center;justify-content: center;" v-else>
			<u-icon name="plus" color="#d4a781" size="36rpx"></u-icon>
			<text style="margin-left: 20rpx;">选择收货地址</text>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			model: {
				type: Object,
				default: () => {
					return {}
				}
			},
			isShowArrowRight:{
				type: Boolean,
				default: true
			}
		},
		data() {
			return {
			}
		},
		methods:{
			click(){
				this.$emit("click")
			},
		}
	}
</script>

<style lang="scss" scoped>
	.addrInfo{
		padding: 30rpx;
		background-color: #FFFFFF;
		.content{
			display: flex;
			flex-direction: row;
			.left{
				justify-content: flex-start;
				flex-shrink: 0;
			}
			.center{
				width: 100%;
				margin: 0 20rpx;
				display: flex;
				flex-direction: column;
				.top{
					display: flex;
					flex-direction: row;
				}
				.footer{
					margin-top: 16rpx;
					flex-shrink: 0;
				}
			}
		}
		
	}
</style>
